﻿@using System.Data;
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    DataTable dt = (DataTable)ViewData["TB_System_Lst"];
    string TemplateID = (string)ViewData["M_TemplateID"];
}
<style type="text/css">
    .border_right
    {
        border-right:1px solid #000000;
        width:20%;
    }    
    .w_TenDanhMuc
    {
        width:30%;
    }
    .title_Header
    {
        background-color:Blue;
        color:White;
        font-weight:bold;
        text-align:center;
    }
</style>
<table style="width: 100%;" border="0" cellpadding="0" cellspacing="3">
    <tr>
        <td valign="top" class="border_right">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr><td><a href="/Administrator/ThietLapTemplate">- Thiết lập template</a></td></tr>                
            </table>
        </td>
        <td valign="top">
            <table style="width: 100%;" border="1" cellpadding="3" cellspacing="0">
                <tr>
                    <td class="w_TenDanhMuc title_Header">Tên danh mục</td>
                    <td class="title_Header" align="center">
                        Hiển thị
                    </td>
                    <td width="20px" align="center"><a href="/Danhmucsys/DanhmucsysAdd/@TemplateID"><img alt="" src="/Images/Icons/add.gif" /></a></td>
                </tr>
               @for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string check = "unchecked.gif";
                    if ((Boolean)dt.Rows[i]["HoatDong"] == true)
                    {
                        check = "checked.gif";
                    }
                    string url = dt.Rows[i]["NameControl"].ToString() + "/" + dt.Rows[i]["NameControl"].ToString() + "List";
                <tr>
                    <td class="w_TenDanhMuc" align="left">
                        <a href="/Danhmucsys/DanhmucsysEdit/@dt.Rows[i]["TBSystemID"]">@dt.Rows[i]["NameTable"]</a>
                    </td>
                    <td align="center">
                        <img alt="" src="/Images/Icons/@check" />
                    </td>
                    <td align="center">
                        <a href="/@url/@TemplateID"><img alt="" src="/Images/Icons/register.gif" /></a>
                    </td>
                </tr>
                }
            </table>       
        </td>
    </tr>
</table>
